﻿using Abp.Dependency;
using Microsoft.AspNetCore.Mvc;
using NetCore.Dtos;
using NetCore.Entities.Needs;
using NetCore.Needs.Dtos;
using NetCore.Services;
using System.Collections.Generic;
using System.ComponentModel;
using System.Threading.Tasks;

namespace NetCore.Needs
{
    /// <summary>
    /// 需求
    /// </summary>
    [Description("需求")]
    public interface INeedAppService : IBaseNetCoreAppService<Need>, ITransientDependency
    {
        /// <summary>
        /// 获取grid数据
        /// </summary>
        /// <returns></returns>
        Task<IList<NeedDto>> Grid();
        /// <summary>
        /// 获取附件名
        /// </summary>
        /// <param name="attachment">附件实体</param>
        /// <returns></returns>
        string GetAttachmentName(NeedAttachment attachment);
        /// <summary>
        /// 创建需求(含上传附件)
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task Create(NeedCreateDto input);
        /// <summary>
        /// 提供给用户下载文件
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<IActionResult> Download(InputIdDto input);

        /// <summary>
        /// 邮件是否已读
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<bool> IsReader(InputNameDto input);
    }
}
